from ronglian_sms_sdk import SmsSDK

def send_sms_code(mobile, sms_code, time):
    accId = 'a216da878d42502017903152b4c1183'
    accToken = 'da63312dd1f47d4bacd0c8a9596f8f2'
    appId = 'a216da878d42502017903152c51118a'
    sdk = SmsSDK(accId, accToken, appId)

    # 2. 调用发送短信的方法
    tid = '1'  # 只能用模板为 1
    mobile = '{}'.format(mobile)
    datas = (sms_code, time)
    # 我们就不判断发送成功与否了
    sdk.sendMessage(tid, mobile, datas)